export const schema = {
    type: "page",
    title: "编辑公告",
    toolbar: {
        type: "button",
        actionType: "submit",
        label: "保存",
        icon: "fa fa-save pull-left",
        level: "primary",
        target: "orgcreateform"
    },
    body: {
        api: "put:/api/news/${id}",
        initApi: "get:/api/news/${id}",
        redirect: "/news/list",
        submitText: "",
        name: "orgcreateform",
        type: "form",
        title: "",
        mode: "horizontal",
        actions: [
            {
                type: "submit",
                primary: true,
                label: "保存",
                icon: "fa fa-save pull-left"
            }
        ],
        controls: [
            {
                type: "static",
                name: "id",
                label: "ID"
            },
            {
                type: "text",
                name: "title",
                label: "标题",
                // placeholder: "",
                required: true
            },
            {
                type: "select",
                name: "org_id",
                label: "所属机构名称",
                placeholder: "选择所属机构名称",
                clearable: true,
                autoComplete: '/api/org/sug?not_options=1&_=${_}',
                visibleOn: 'acl.can("org:create")'
            },

            {
                type: "image",
                name: "photo",
                label: "公告图",
                required: true,
                // accept: "image/png,image/jpeg",
                maxSize: 10 * 1024 * 1024,
                desc: '请选择 jpg 或者 png 图片，单个文件请不要超过 10M'
            },

            {
                type: "rich-text",
                name: "content",
                label: "公告详情",
                required: true
            },
        ]
    }
};
